// 引入keys文件
const keys = require('../config/keys')

// mongoose connect
const mongoose = require('mongoose');
mongoose.connect(keys.mongodbURI, {
    useNewUrlParser: true,
    useUnifiedTopology: true
  })
  .then(res => console.log('mongodb connect'))
  .catch(err => console.log(err))


module.exports = mongoose;